
--[[
local iplist = {
["127.0.0.1"] = 1,
["184.72.13.6"] = 1,
["54.219.206.247"] = 1,--  #d3017.intsig.net
["10.196.99.3"] = 1,--    #d3017.intsig.net
["10.168.150.69"] = 1,-- #web
["10.176.50.157"] = 1,-- #web
["101.226.199.163"] = 1,-- #shanghai cs


["223.5.23.94"] = 1,--
["223.5.23.95"] = 1,--
}

local function getip()
    if ngx.var.http_x_forwarded_for then 
        return string.match(ngx.var.http_x_forwarded_for, "([%d%.]+)$")
    end  
    return ngx.var.remote_addr or ""
end

local ip = ngx.var.remote_addr 
if 1 ~= iplist[ip] then
    ip = getip()
    if 1 ~= iplist[ip] then
        nlog.derror(ip.." access cs forbid");
        ngx.status = 403
        ngx.say("Welcome to www.intsig.com")
        ngx.exit(200)
    end
end
--]]
